package edu.hubu.javaweb01demo.service.impl;

import edu.hubu.javaweb01demo.dao.UserDao;
import edu.hubu.javaweb01demo.dao.impl.UserDaoImpl;
import edu.hubu.javaweb01demo.entity.Users;
import edu.hubu.javaweb01demo.exception.IdIsNullException;
import edu.hubu.javaweb01demo.service.UserService;
import edu.hubu.javaweb01demo.util.Base64Util;
import edu.hubu.javaweb01demo.util.DBHelper;
import edu.hubu.javaweb01demo.util.JdbcUtil;
import java.sql.ResultSet;
import java.util.ArrayList;

public class UserServiceImpl implements UserService {

    private UserDao userDao = new UserDaoImpl();

    @Override
    public int addUser(Users users) {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public int delUserById(Integer id) throws IdIsNullException {
        return userDao.delUserById(id);
    }

    @Override
    public int updateUser(Users users) {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public boolean checkUser(String name, String pwd) {
        return userDao.checkUser(name, pwd);
    }

    @Override
    public ArrayList<Users> getAllUsers() {
        return userDao.getAllUsers();
    }

    @Override
    public ArrayList<Users> getPageUsers(int pageNow, int pageSize) {
        return userDao.getPageUsers(pageNow, pageSize);
    }

}
